import React, { PureComponent } from 'react'
import { View } from '@tarojs/components'
import { getPlatform } from '@UTILS/common'
import './HomeVideoPlaceholder.scss'
const getStylePx = px => (getPlatform().isRN ? px : `${px}px`)
export default class HomeVideoPlaceholder extends PureComponent {
  render() {
    const { style = {}, width, height } = this.props
    return [...Array(2)].map((item, index) => (
      <View className="homeVideoPlaceholder" style={{ width: getStylePx(width), height: getStylePx(height), ...style }} key={index.toString()}>
        <View className="coverImage skeleton-blink" />
        <View className="title-container">
          <View className="row skeleton-blink" />
          <View className="row skeleton-blink row-half" />
        </View>
      </View>
    ))
  }
}
